projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
92d42d4
)
bitmask: add an assertion
author
Matthias Clasen
<mclasen@redhat.com>
Mon, 25 May 2020 21:18:27 +0000
(17:18 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Tue, 26 May 2020 00:56:09 +0000
(20:56 -0400)
The static analysis in ci is complaining about
this, since it doesn't know that start is always
smaller than end.
gtk/gtkbitmaskprivateimpl.h
patch
|
blob
|
history
diff --git
a/gtk/gtkbitmaskprivateimpl.h
b/gtk/gtkbitmaskprivateimpl.h
index 3a16e178fcc88b1e942ccce23142d721124e30a0..d9598528c5f022fcfd5fb31a8ad9b0a84d09bf9c 100644
(file)
--- a/
gtk/gtkbitmaskprivateimpl.h
+++ b/
gtk/gtkbitmaskprivateimpl.h
@@
-124,6
+124,8
@@
_gtk_bitmask_invert_range (GtkBitmask *mask,
guint start,
guint end)
{
+ g_assert (start <= end);
+
if (_gtk_bitmask_is_allocated (mask) ||
(end > GTK_BITMASK_N_DIRECT_BITS))
return _gtk_allocated_bitmask_invert_range (mask, start, end);